<div>
    <h2 id="page-heading">
        <span>App Users</span>
        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-app-user" [routerLink]="['/app-user/new']">
            <fa-icon [icon]="'plus'"></fa-icon>
            <span >
            Create new App User
            </span>
        </button>
    </h2>
    <jhi-alert></jhi-alert>
    <br/>
    <div class="table-responsive" *ngIf="appUsers">
        <table class="table table-striped">
            <thead>
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
            <th jhiSortBy="id"><span>ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="openId"><span>Open Id</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="name"><span>Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="age"><span>Age</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="phone"><span>Phone</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="weChat"><span>We Chat</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="address"><span>Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th></th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let appUser of appUsers ;trackBy: trackId">
                <td><a [routerLink]="['/app-user', appUser.id, 'view' ]">{{appUser.id}}</a></td>
                <td>{{appUser.openId}}</td>
                <td>{{appUser.name}}</td>
                <td>{{appUser.age}}</td>
                <td>{{appUser.phone}}</td>
                <td>{{appUser.weChat}}</td>
                <td>{{appUser.address}}</td>
                <td class="text-right">
                    <div class="btn-group flex-btn-group-container">
                        <button type="submit"
                                [routerLink]="['/app-user', appUser.id, 'view' ]"
                                class="btn btn-info btn-sm">
                            <fa-icon [icon]="'eye'"></fa-icon>
                            <span class="d-none d-md-inline">View</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/app-user', appUser.id, 'edit']"
                                class="btn btn-primary btn-sm">
                            <fa-icon [icon]="'pencil-alt'"></fa-icon>
                            <span class="d-none d-md-inline">Edit</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/', 'app-user', { outlets: { popup: appUser.id + '/delete'} }]"
                                replaceUrl="true"
                                queryParamsHandling="merge"
                                class="btn btn-danger btn-sm">
                            <fa-icon [icon]="'times'"></fa-icon>
                            <span class="d-none d-md-inline">Delete</span>
                        </button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div *ngIf="appUsers && appUsers.length">
        <div class="row justify-content-center">
            <jhi-item-count [page]="page" [total]="totalItems" [maxSize]="5" [itemsPerPage]="itemsPerPage"></jhi-item-count>
        </div>
        <div class="row justify-content-center">
            <ngb-pagination [collectionSize]="totalItems" [(page)]="page" [pageSize]="itemsPerPage" [maxSize]="5" [rotate]="true" [boundaryLinks]="true" (pageChange)="loadPage(page)"></ngb-pagination>
        </div>
    </div>
</div>
